/**
 * JZ UnoCSS - 预设模块
 * @version 1.0.0
 * @author jz
 */

import { processCode } from '../processors/processor.js';

// 预设（这些预设现在只是占位符，实际功能都集成在core预设中）
export const flex = () => ({
    name: 'jz-unocss:presets:flex',
    // 不再单独处理，避免重复
});

export const media = () => ({
    name: 'jz-unocss:presets:media',
    // 不再单独处理，避免重复
});

export const unocss = () => ({
    name: 'jz-unocss:presets:unocss',
    // 不再单独处理，避免重复
});

export const pseudo = () => ({
    name: 'jz-unocss:presets:pseudo',
    // 不再单独处理，避免重复
});

export const sketch = () => ({
    name: 'jz-unocss:presets:sketch',
    // 不再单独处理，避免重复
});

export const border = (options = {}) => ({
    name: 'jz-unocss:presets:border',
    // 不再单独处理，避免重复
});

// 核心预设
export const core = () => ({
    name: 'jz-unocss:presets:core',
    transform: (code, id, platform, config) => {
        return processCode(code, { 
            platform, 
            h5Unit: config?.h5Unit || 'rem',
            remBase: config?.remBase || 16
        });
    }
}); 